package org.xtense.data;

import org.eclipse.jface.preference.IPreferenceStore;
import org.xtense.rcp.Activator;
import org.xtense.rcp.preferences.PreferencesConstants;

public class DBConfigFromUI extends DBConfig {

	public DBConfigFromUI() {
		IPreferenceStore ps = Activator.getDefault().getPreferenceStore();
		
		this.driver = ps.getString(PreferencesConstants.CLASSNAME_KEY);
		this.url = ps.getString(PreferencesConstants.URL_KEY);
		this.username = ps.getString(PreferencesConstants.USERNAME_KEY);
		this.password = ps.getString(PreferencesConstants.PASSWORD_KEY);
	}
	
	public DBConfigFromUI(String[] config) {
		this.driver = config[0];
		this.url = config[1];
		this.username = config[2];
		this.password = config[3];
	}
	

}
